{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="{:url('admin/user/index')}">用户管理</a></li>
            <!--<li class=""><a href="{:url('admin/user/add')}">添加用户</a></li>-->
            <li class="layui-this">编辑用户</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="{:url('admin/user/update')}" method="post">

                    <div class="layui-form-item">
                        <label class="layui-form-label">用户账号</label>
                        <div class="layui-input-block">
                            <input type="text" name="mobile" value="{$user.mobile}" required  lay-verify="required" placeholder="请输入用户名"  class="layui-input layui-input-inline">
                        </div>
                    </div>




                    <div class="layui-form-item">
                        <label class="layui-form-label">用户昵称</label>
                        <div class="layui-input-block">
                            <input type="text" name="username" value="{$user.username}" required  lay-verify="required" placeholder="请输入用户名"  class="layui-input layui-input-inline">
                        </div>
                    </div>





                    <div class="layui-form-item">
                        <label class="layui-form-label">用户性别</label>
                        <div class="layui-input-block">
                            {switch	name="user.sex"}
                            {case	value="1"}
                            <input type="radio" name="sex" value="1" title="男" checked="checked">
                            <input type="radio" name="sex" value="2" title="女">
                            {/case}
                            {case	value="2"}
                            <input type="radio" name="sex" value="1" title="男">
                            <input type="radio" name="sex" value="2" title="女" checked="checked">
                            {/case}
                            {default	/}
                            <input type="radio" name="sex" value="1" title="男">
                            <input type="radio" name="sex" value="2" title="女">
                            {/switch}

                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">新密码</label>
                        <div class="layui-input-block">
                            <input type="text" name="password" value="" placeholder="新密码"  class="layui-input layui-input-inline">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">确认密码</label>
                        <div class="layui-input-block">
                            <input type="text" name="verify_password" value="" placeholder="确认密码"  class="layui-input layui-input-inline">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户积分</label>
                        <div class="layui-input-block">
                            <input type="text" name="integral" value="{$user.integral}" placeholder="用户积分"  class="layui-input layui-input-inline">
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">账户启用状态</label>
                        <div class="layui-input-block">
                            <input type="radio" name="status" value="1" title="启用" {if condition="$user.status==1"} checked="checked"{/if}>
                            <input type="radio" name="status" value="2" title="禁用" {if condition="$user.status==2"} checked="checked"{/if}>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="{$user.id}">
                            <button class="layui-btn" lay-submit lay-filter="*">更新</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script>

</script>

{/block}